<template>
	<view class="content fofa poRel">
		<web-view :src="webViewUrl"></web-view>
	</view>
</template>

<script>
	import tabnav from "../common/tabnav/tabnav.vue"
	export default {
		components: {
			tabnav,
		},
		data() {
			return {
				back: uni.getStorageSync('back'),
				backTwo: uni.getStorageSync('backTwo'),
				webViewUrl: '',
				flowid: ''
			}
		},
		onLoad(option) {
			this.flowid = option.flowid
			uni.setNavigationBarColor({
			  frontColor: '#ffffff', // 导航栏标题颜色，只能是'black'或'white'
			  backgroundColor: this.back // 导航栏背景颜色
			});
			this.getList()
		},
		methods: {
			getList(){
				var that = this
				uni.request({
					url: that.global.url+'api/qianyu_dzq/applet_loadpdf',
					method: 'POST',
					header:{'site-id':that.global.site_id,'token': uni.getStorageSync('inuse_userinfo_token')},
					data: {flowid: that.flowid},
					success(res) {
					    let result = res.data
						console.log(result);
					    if(result.code == 1){
							that.webViewUrl = result.data
					    }else{
					        uni.showToast({
					            title: result.msg,
					            icon:'none',
								duration: 2000
					        })
					    }
					},
					complete() {
						uni.hideLoading()
					}
				})
			},
			tiaozhuan(url) {
				uni.navigateTo({
					url: url
				});
			},
		}
	}
</script>

<style>
	.content {
		min-height: 100vh;
		background-color: #F4F3F3;
	}
</style>